from ast import List
import math

class Solution:
    def dicesProbability(self, n: int) -> List[float]:
        dp = [[0 for _ in range(6*n)] for _ in range(n)]
        # 第一行
        for i  in range(6):
            dp[0][i] = 1
        
        for i in range(1, n):
            for j in range(i, 6*(i+1)):
                for k in range(1,7):
                    if i-1>=0 and j-k>=0:
                        dp[i][j] += dp[i-1][j-k]
        res = []
        all = math.pow(6.0, n)
        for i in range(5 * n + 1):
            res.append(dp[n-1][i+n-1]/all)
        
        return res